<?php
$this->breadcrumbs=array(
	'View Monitorings'=>array('index'),
	$model->id,
);

$this->menu=array(
	array('label'=>Yii::t('view', 'View Monitoring'),'url'=>array('index'),'icon'=>'fa fa-list-alt', 'items' =>
		array(	
			array('label'=>Yii::t('view', 'List Checkpoint'),'url'=>array('viewcheckpoint/'),'icon'=>'fa fa-tasks'),
			array('label'=>Yii::t('view', 'List Monitoring '),'url'=>array('viewmonitoring/'),'icon'=>'fa fa-clock-o'),	
			array('label'=>Yii::t('view', 'Create Checkpoint'),'url'=>array('monitoring/create'),'icon'=>'fa fa-plus-square','visible'=>(Yii::app()->user->isAdmin() || Yii::app()->user->isWeigher())),
			array('label'=>Yii::t('view', 'Delete Monitoring'),'url'=>'#','visible'=>Yii::app()->user->isAdmin(),'linkOptions'=>array('submit'=>array('monitoring/delete','id'=>$model->id),'confirm'=>Yii::t('view', 'Are you sure you want to delete this item?')),'icon'=>'fa fa-trash-o'),
		)
	)	
);
?>

<?php $box = $this->beginWidget(
    'bootstrap.widgets.TbBox',
    array(
        'title' =>Yii::t('view', 'View Monitoring #').$model->id,
        'headerIcon' => 'icon- fa fa-eye',
        'headerButtons' => array(
            array(
                'class' => 'bootstrap.widgets.TbButtonGroup',
                'type' => 'success',
                // '', 'primary', 'info', 'success', 'warning', 'danger' or 'inverse'
                'buttons' => $this->menu
            ),
        ) 
    )
);?>
		<?php $this->widget('bootstrap.widgets.TbAlert', array(
		    'block'=>false, // display a larger alert block?
		    'fade'=>true, // use transitions?
		    'closeText'=>'&times;', // close link text - if set to false, no close link is displayed
		    'alerts'=>array( // configurations per alert type
		        'success'=>array('block'=>true, 'fade'=>true, 'closeText'=>'&times;'), //success, info, warning, error or danger
		        'info'=>array('block'=>true, 'fade'=>true, 'closeText'=>'&times;'), //success, info, warning, error or danger
		        'warning'=>array('block'=>true, 'fade'=>true, 'closeText'=>'&times;'), //success, info, warning, error or danger
		        'error'=>array('block'=>true, 'fade'=>true, 'closeText'=>'&times;'), //success, info, warning, error or danger
		        'danger'=>array('block'=>true, 'fade'=>true, 'closeText'=>'&times;'), //success, info, warning, error or danger
		    ),
		));
		?>		
<?php $this->widget('bootstrap.widgets.TbDetailView',array(
	'data'=>$model,
	'attributes'=>array(
                array(
		        'name'=>Yii::t('view', 'Tanggal'),
                            'type'=>'raw',
                            'value' => date('d-m-Y', strtotime($model->created)),
		 ),
                'noTiket',
                'noDokumen',
		array(
		        'name'=>Yii::t('view', 'No Surat Jalan'),
                            'type'=>'raw',
                            'value' => (@$ekspedisi->noSJ),
		 ),
                'noPolisi',
                'namaSupir',
                'tipe',
                'deskripsi',
                'standarWaktu',
                'statusMobil',
		array(
		        'name'=>Yii::t('view', 'Timbangan Masuk'),
                            'type'=>'raw',
                            'value' => date('H:i:s', strtotime($model->timbanganMasuk)),
		 ),
		array(
		        'name'=>Yii::t('view', 'Masuk Parkir'),
                            'type'=>'raw',
                            'value' => date('H:i:s', strtotime($model->waktuParkir)),
		 ),
		array(
		        'name'=>Yii::t('view', 'Interval Timbangan ke Parkir'),
                            'type'=>'raw',
                            'value' => ($timbanganParkir),
		 ),
		array(
		        'name'=>Yii::t('view', 'Interval Parkir ke Gudang'),
                            'type'=>'raw',
                            'value' => ($parkirGudang),
		 ),
		array(
		        'name'=>Yii::t('view', 'Waktu Masuk Gudang'),
                            'type'=>'raw',
                            'value' => date('H:i:s', strtotime($model->waktuMulai)),
		 ),
		array(
		        'name'=>Yii::t('view', 'Target Waktu Selesai'),
                            'type'=>'raw',
                            'value' => date('H:i:s', strtotime($model->targetWaktu)),
		 ),
		array(
		        'name'=>Yii::t('view', 'Waktu Keluar Gudang'),
                            'type'=>'raw',
                            'value' => date('H:i:s', strtotime($model->waktuSelesai)),
		 ),
		array(
		        'name'=>Yii::t('view', 'Keterangan'),
                            'type'=>'raw',
                            'value' => (@$result),
		 ),
		array(
		        'name'=>Yii::t('view', 'Timbangan Keluar'),
                            'type'=>'raw',
                            'value' => date('H:i:s', strtotime($model->timbanganKeluar)),
		 ),
		array(
		        'name'=>Yii::t('view', 'Rute'),
                            'type'=>'raw',
                            'value' => (@$rute->namaRute),
		 ),
	),
)); ?>

<?php $this->endWidget(); ?>